3.1.97 \(\int (\frac {x^2}{\sec ^{\frac {3}{2}}(x)}-\frac {1}{3} x^2 \sqrt {\sec (x)}) \, dx\) [97]

Optimal. Leaf size=62 \[ \frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}-\frac {16}{27} \sqrt {\cos (x)} F\left (\left .\frac {x}{2}\right |2\right ) \sqrt {\sec (x)}-\frac {16 \sin (x)}{27 \sqrt {\sec (x)}}+\frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}} \]

[Out]

8/9*x/sec(x)^(3/2)-16/27*sin(x)/sec(x)^(1/2)+2/3*x^2*sin(x)/sec(x)^(1/2)-16/27*(cos(1/2*x)^2)^(1/2)/cos(1/2*x)
*EllipticF(sin(1/2*x),2^(1/2))*cos(x)^(1/2)*sec(x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.11, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {4273, 4274, 3854, 3856, 2720} \begin {gather*} \frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}}+\frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}-\frac {16 \sin (x)}{27 \sqrt {\sec (x)}}-\frac {16}{27} \sqrt {\cos (x)} \sqrt {\sec (x)} F\left (\left .\frac {x}{2}\right |2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/Sec[x]^(3/2) - (x^2*Sqrt[Sec[x]])/3,x]

[Out]

(8*x)/(9*Sec[x]^(3/2)) - (16*Sqrt[Cos[x]]*EllipticF[x/2, 2]*Sqrt[Sec[x]])/27 - (16*Sin[x])/(27*Sqrt[Sec[x]]) +
 (2*x^2*Sin[x])/(3*Sqrt[Sec[x]])

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 3854

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Csc[c + d*x])^(n + 1)/(b*d*n)), x
] + Dist[(n + 1)/(b^2*n), Int[(b*Csc[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && Integer
Q[2*n]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 4273

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[d*m*(c + d*x)^(m - 1)*((
b*Csc[e + f*x])^n/(f^2*n^2)), x] + (Dist[(n + 1)/(b^2*n), Int[(c + d*x)^m*(b*Csc[e + f*x])^(n + 2), x], x] - D
ist[d^2*m*((m - 1)/(f^2*n^2)), Int[(c + d*x)^(m - 2)*(b*Csc[e + f*x])^n, x], x] + Simp[(c + d*x)^m*Cos[e + f*x
]*((b*Csc[e + f*x])^(n + 1)/(b*f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && LtQ[n, -1] && GtQ[m, 1]

Rule 4274

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Dist[(b*Sin[e + f*x])^n*(b*C
sc[e + f*x])^n, Int[(c + d*x)^m/(b*Sin[e + f*x])^n, x], x] /; FreeQ[{b, c, d, e, f, m, n}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \left (\frac {x^2}{\sec ^{\frac {3}{2}}(x)}-\frac {1}{3} x^2 \sqrt {\sec (x)}\right ) \, dx &=-\left (\frac {1}{3} \int x^2 \sqrt {\sec (x)} \, dx\right )+\int \frac {x^2}{\sec ^{\frac {3}{2}}(x)} \, dx\\ &=\frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}+\frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}}+\frac {1}{3} \int x^2 \sqrt {\sec (x)} \, dx-\frac {8}{9} \int \frac {1}{\sec ^{\frac {3}{2}}(x)} \, dx-\frac {1}{3} \left (\sqrt {\cos (x)} \sqrt {\sec (x)}\right ) \int \frac {x^2}{\sqrt {\cos (x)}} \, dx\\ &=\frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}-\frac {16 \sin (x)}{27 \sqrt {\sec (x)}}+\frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}}-\frac {8}{27} \int \sqrt {\sec (x)} \, dx\\ &=\frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}-\frac {16 \sin (x)}{27 \sqrt {\sec (x)}}+\frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}}-\frac {1}{27} \left (8 \sqrt {\cos (x)} \sqrt {\sec (x)}\right ) \int \frac {1}{\sqrt {\cos (x)}} \, dx\\ &=\frac {8 x}{9 \sec ^{\frac {3}{2}}(x)}-\frac {16}{27} \sqrt {\cos (x)} F\left (\left .\frac {x}{2}\right |2\right ) \sqrt {\sec (x)}-\frac {16 \sin (x)}{27 \sqrt {\sec (x)}}+\frac {2 x^2 \sin (x)}{3 \sqrt {\sec (x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 51, normalized size = 0.82 \begin {gather*} \frac {1}{27} \sqrt {\sec (x)} \left (12 x+12 x \cos (2 x)-16 \sqrt {\cos (x)} F\left (\left .\frac {x}{2}\right |2\right )-8 \sin (2 x)+9 x^2 \sin (2 x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/Sec[x]^(3/2) - (x^2*Sqrt[Sec[x]])/3,x]

[Out]

(Sqrt[Sec[x]]*(12*x + 12*x*Cos[2*x] - 16*Sqrt[Cos[x]]*EllipticF[x/2, 2] - 8*Sin[2*x] + 9*x^2*Sin[2*x]))/27

________________________________________________________________________________________

Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \frac {x^{2}}{\sec \left (x \right )^{\frac {3}{2}}}-\frac {x^{2} \left (\sqrt {\sec }\left (x \right )\right )}{3}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/sec(x)^(3/2)-1/3*x^2*sec(x)^(1/2),x)

[Out]

int(x^2/sec(x)^(3/2)-1/3*x^2*sec(x)^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sec(x)^(3/2)-1/3*x^2*sec(x)^(1/2),x, algorithm="maxima")

[Out]

integrate(-1/3*x^2*sqrt(sec(x)) + x^2/sec(x)^(3/2), x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sec(x)^(3/2)-1/3*x^2*sec(x)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \left (- \frac {3 x^{2}}{\sec ^{\frac {3}{2}}{\left (x \right )}}\right )\, dx + \int x^{2} \sqrt {\sec {\left (x \right )}}\, dx}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/sec(x)**(3/2)-1/3*x**2*sec(x)**(1/2),x)

[Out]

-(Integral(-3*x**2/sec(x)**(3/2), x) + Integral(x**2*sqrt(sec(x)), x))/3

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sec(x)^(3/2)-1/3*x^2*sec(x)^(1/2),x, algorithm="giac")

[Out]

integrate(-1/3*x^2*sqrt(sec(x)) + x^2/sec(x)^(3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} -\int \frac {x^2\,\sqrt {\frac {1}{\cos \left (x\right )}}}{3}-\frac {x^2}{{\left (\frac {1}{\cos \left (x\right )}\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(1/cos(x))^(3/2) - (x^2*(1/cos(x))^(1/2))/3,x)

[Out]

-int((x^2*(1/cos(x))^(1/2))/3 - x^2/(1/cos(x))^(3/2), x)

________________________________________________________________________________________